home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Make / source / signame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-23  |  2.1 KB  |  68 lines

  1. /* Convert between signal names and numbers.
  2.    Copyright (C) 1990, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
  3.    This file is part of the GNU C Library.
  4.  
  5.    The GNU C Library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public License as
  7.    published by the Free Software Foundation; either version 2 of the
  8.    License, or (at your option) any later version.
  9.  
  10.    The GNU C Library is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with the GNU C Library; see the file COPYING.LIB.  If not,
  17.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.    Boston, MA 02111-1307, USA.  */
  19.  
  20. #if defined (__STDC__) && __STDC__
  21.  
  22. /* Initialize `sys_siglist'.  */
  23. void signame_init (void);
  24.  
  25. /* Return the abbreviation (e.g. ABRT, FPE, etc.) for signal NUMBER.
  26.    Do not return this as a const char *.  The caller might want to
  27.    assign it to a char *.  */
  28. char *sig_abbrev (int number);
  29.  
  30. /* Return the signal number for an ABBREV, or -1 if there is no
  31.    signal by that name.  */
  32. int sig_number (const char *abbrev);
  33.  
  34. /* Avoid conflicts with a system header file that might define these three.  */
  35.  
  36. #ifndef HAVE_PSIGNAL
  37. /* Print to standard error the name of SIGNAL, preceded by MESSAGE and
  38.    a colon, and followed by a newline.  */
  39. void psignal (int signal, const char *message);
  40. #endif
  41.  
  42. #ifndef HAVE_STRSIGNAL
  43. /* Return the name of SIGNAL.  */
  44. char *strsignal (int signal);
  45. #endif
  46.  
  47. #if !defined (HAVE_SYS_SIGLIST)
  48. /* Names for signals from 0 to NSIG-1.  */
  49. extern const char *sys_siglist[];
  50. #endif
  51.  
  52. #else
  53.  
  54. void signame_init ();
  55. char *sig_abbrev ();
  56. int sig_number ();
  57. #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL)
  58. void psignal ();
  59. #endif
  60. #ifndef HAVE_STRSIGNAL
  61. char *strsignal ();
  62. #endif
  63. #if !defined (HAVE_SYS_SIGLIST)
  64. extern char *sys_siglist[];
  65. #endif
  66.  
  67. #endif
  68.